package com.zzt.controller;

import com.zzt.entity.Goodstype;
import com.zzt.service.GoodstypeService;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
@CrossOrigin
@RestController
public class GoodstypeController {
    @Resource
    GoodstypeService goodstypeService;

    @RequestMapping("/goodsType")
    public List<Goodstype> getAllGoodstype(){
        List<Goodstype> goodstypes = goodstypeService.queryGoodsType();
        return goodstypes;
    }
}
